CREATE TABLE IF NOT EXISTS mytrip_tourscategory(
CategoryId INT (11) NOT NULL,
Title VARCHAR (256) NOT NULL,
Path VARCHAR (256) NOT NULL,
CreateDate DATETIME NOT NULL,
Culture VARCHAR (100) NOT NULL,
AllCulture BIT (1) NOT NULL,
Body TEXT DEFAULT NULL,
UserName VARCHAR (100) NOT NULL,
SubCategoryId INT (11) NOT NULL,
PRIMARY KEY (CategoryId),
INDEX mytrip_tourscategory_FK1 USING BTREE (SubCategoryId),
CONSTRAINT mytrip_tourscategory_FK1 FOREIGN KEY (SubCategoryId)
REFERENCES mytrip_tourscategory (CategoryId)
)
ENGINE = INNODB
AVG_ROW_LENGTH = 5461
CHARACTER SET cp1251
COLLATE cp1251_general_ci;
CREATE TABLE IF NOT EXISTS mytrip_tours(
TourId INT (11) NOT NULL,
CategoryId INT (11) NOT NULL,
Title VARCHAR (256) NOT NULL,
Path VARCHAR (256) NOT NULL,
Body TEXT DEFAULT NULL,
Imige VARCHAR (256) DEFAULT NULL,
MinPrice DECIMAL (18, 2) NOT NULL,
MoneyId VARCHAR (256) NOT NULL,
CreateDate DATETIME NOT NULL,
StopDate DATETIME NOT NULL,
Latitude DECIMAL (10, 8) DEFAULT NULL,
Longitude DECIMAL (10, 8) DEFAULT NULL,
CloseTourDate DATETIME NOT NULL,
UserName VARCHAR (100) NOT NULL,
Culture VARCHAR (100) NOT NULL,
AllCulture BIT (1) NOT NULL,
StartDate DATETIME NOT NULL,
PRIMARY KEY (TourId),
INDEX mytrip_tours_FK1 USING BTREE (CategoryId),
CONSTRAINT mytrip_tours_FK1 FOREIGN KEY (CategoryId)
REFERENCES mytrip_tourscategory (CategoryId)
)
ENGINE = INNODB
AVG_ROW_LENGTH = 2730
CHARACTER SET cp1251
COLLATE cp1251_general_ci;
CREATE TABLE IF NOT EXISTS mytrip_toursvariants(
VariantId INT (11) NOT NULL,
TourId INT (11) NOT NULL,
Price DECIMAL (18, 2) NOT NULL,
MoneyId VARCHAR (100) NOT NULL,
Hotel VARCHAR (1000) NOT NULL,
Services VARCHAR (1000) DEFAULT NULL,
Latitude DECIMAL (10, 8) DEFAULT NULL,
Longitude DECIMAL (10, 8) DEFAULT NULL,
UserName VARCHAR (100) NOT NULL,
PRIMARY KEY (VariantId),
INDEX mytrip_toursvariants_FK1 USING BTREE (TourId),
CONSTRAINT mytrip_toursvariants_FK1 FOREIGN KEY (TourId)
REFERENCES mytrip_tours (TourId)
)
ENGINE = INNODB
AVG_ROW_LENGTH = 2730
CHARACTER SET cp1251
COLLATE cp1251_general_ci;